package com.bite.lesson4;

import java.util.Scanner;

public class Demo_04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            int sum = fun(n);
            System.out.println(sum);
        }
    }

    private static int fun(int n) {
        if (n <= 2) {
            return 1;
        } else {
            return fun(n - 1) + fun(n - 2);
        }
    }
}